import { createRouter, createWebHistory } from "vue-router";
import Home from "../views/Home.vue";

const routerHistory = createWebHistory();
const layoutBase = 'LayoutBase';
const layout1 = 'Layout1';
const layout2 = 'Layout2';

const router = createRouter({
  history: routerHistory, // history
  routes: [
    {
      path: "/home",
      name: "Home",
      component: Home,
      meta: {
        layout: layoutBase,
      },
    },
    {
      path: "/example/ExampleList1",
      name: "ExampleList1",
      component: () => import("../views/example/ExampleList1.vue"),
      meta: {
        layout: layout1,
      },
    },
    {
      path: "/example/ExampleList2",
      name: "ExampleList2",
      component: () => import("../views/example/ExampleList2.vue"),
      meta: {
        layout: layout1,
      },
    },
    {
      path: "/example/ExampleList3",
      name: "ExampleList3",
      component: () => import("../views/example/ExampleList3.vue"),
      meta: {
        layout: layout2,
      },
    },
    {
      path: "/example/ExampleList4",
      name: "ExampleList4",
      component: () => import("../views/example/ExampleList4.vue"),
      meta: {
        layout: layout2,
      },
    },
  ],
});

export default router;